from ext import db


class Order(db.Model):
    __tablename__ = "order"
    id = db.Column(db.Integer, primary_key=True, comment='id主键')  # 必须要有
    name = db.Column(db.String(32), unique=True, comment='用户名')
    order_desc = db.Column(db.String(32), unique=True, comment='用户名')

    def __repr__(self):  # 查询的返回 和str一样
        return f'<{self.__class__.__name__} {self.username}>'
